package com.sise.recomder;

import net.librec.recommender.cf.BHFreeRecommender;
import net.librec.recommender.cf.ItemKNNRecommender;
import net.librec.recommender.cf.UserKNNRecommender;
import net.librec.recommender.cf.rating.*;
import net.librec.recommender.item.RecommendedItem;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zj
 */
@Service
public class LibrecRecomder {

    @Resource
    private PublicUse publicUse;

    public List<RecommendedItem> aspectmodelranking() {
        return publicUse.recomder("aspectmodelranking.properties", new AspectModelRecommender());
    }

    public List<RecommendedItem> bhfree() {
        return publicUse.recomder("bhfree.properties", new BHFreeRecommender());
    }

    public List<RecommendedItem> gplsa() {
        return publicUse.recomder("gplsa.properties", new GPLSARecommender());
    }

    public List<RecommendedItem> itemknn() {
        return publicUse.recomder("itemknn.properties", new ItemKNNRecommender());
    }

    public List<RecommendedItem> mfals() {
        return publicUse.recomder("mfals.properties", new MFALSRecommender());
    }

    public List<RecommendedItem> pmf() {
        return publicUse.recomder("pmf.properties", new PMFRecommender());
    }

    public List<RecommendedItem> svdpp() {
        return publicUse.recomder("svdpp.properties", new SVDPlusPlusRecommender());
    }

    public List<RecommendedItem> userknn() {
        return publicUse.recomder("userknn.properties", new UserKNNRecommender());
    }

}
